let arr = ['杨幂', '范冰冰', '朱润发', '古力娜扎', '舜']
for (let i = 0, n = arr.length; i < n - 1; i++) {
    for (let j = 0, n = arr.length; j < n - i - 1; j++) {
        if (arr[j].length > (arr[j + 1]).length) {
            let t = arr[j]
            arr[j] = arr[j + 1]
            arr[j + 1] = t
        }

    }

}
console.log(arr)